package com.peanut.youfupay.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class MerInfoConstant {
    /**
     * 字符编码
     */
    public static final String CHARSET_UTF_8 = "UTF-8";

    /**
     * 商户平台代付技术对接：ApiKey=INTER_KEY
     */

    public static String INTER_KEY;

    /**
     * 商户私钥：商户使用私钥进行签名
     */
    public static String MER_PRIVATE_KEY;
    /**
     * 商户公钥
     **/
    public static String MER_PUBLIC_KEY;
    /**
     * 优付公钥：商户使用优付公钥验签
     */

    public static String YOU_FU_PUBLIC_KEY;
    /**
     * 商户ID
     */

    public static String MER_ID;
    /**
     * 项目ID
     */

    public static String PROJECT_ID;
    /**
     * 版本号
     */

    public static String API_VERSION;
    /**
     * 请求地址
     */

    public static String YOU_FU_URL;

    @Value("${INTER_KEY}")
    public void setInterKey(String interKey) {
        INTER_KEY = interKey;
    }

    @Value("${MER_PRIVATE_KEY}")
    public void setMerPrivateKey(String merPrivateKey) {
        MER_PRIVATE_KEY = merPrivateKey;
    }

    @Value("${MER_PUBLIC_KEY}")
    public void setMerPublicKey(String merPublicKey) {
        MER_PUBLIC_KEY = merPublicKey;
    }

    @Value("${YOU_FU_PUBLIC_KEY}")
    public void setYouFuPublicKey(String youFuPublicKey) {
        YOU_FU_PUBLIC_KEY = youFuPublicKey;
    }

    @Value("${MER_ID}")
    public void setMerId(String merId) {
        MER_ID = merId;
    }

    @Value("${PROJECT_ID}")
    public void setProjectId(String projectId) {
        PROJECT_ID = projectId;
    }

    @Value("${API_VERSION}")
    public void setApiVersion(String apiVersion) {
        API_VERSION = apiVersion;
    }

    @Value("${YOU_FU_URL}")
    public void setYouFuUrl(String youFuUrl) {
        YOU_FU_URL = youFuUrl;
    }

}
